var ligerGrid;

$(function() {
			var options = {
				queryKey : queryKey,
				pageSize : 30,
				gridWidth : null,
				gridHeight : 580,
				showIdx : false,
				// init param for groove.query, property querykey is reserved,
				// property method is reserved,
				// init param for groove.view, property id is reserved
				gridRender : function(grid) {
					ligerGrid = grid;
				}
			};
			var gridPanel = new $.grooveQuery(options);

			$("#pageloading").hide();
		});

function defaultFnRender(rowdata, rowindex, value, column) {
	if (column.name == "LA_DATE" || column.name == "LA_AUDITTIME") {
		return formatDate(value);
	} else if (column.name == "LA_STATUS") {
		if (value == "-1") {
			return "审核未通过";
		} else if (value == "0") {
			return "待审核";
		} else if (value == "1") {
			return "审核通过";
		} else if (value == "2") {
			return "合同生成";
		}
		return value
	} else if (column.name == "SP") {
		return "<a href=\"javascript:void(0);\" onclick=\"view('"
				+ rowdata["PK_ID"] + "', '" + rowdata["LA_LOANPRODUCTID"]
				+ "')\">查阅</a>";
	}
	return value;
}

function view(id, fpid) {
	document.location = context + "/site/companySupplier/8-1.jsp?id=" + id;
}